package cn.jilian.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

import cn.jilian.entity.AbstractEntity;

@Entity
@Table(name="bt_auth",uniqueConstraints = @UniqueConstraint(name="loginNameUnqiueByCode",columnNames = { "code" }))
public class Auth extends AbstractEntity{

	public static final Long metaId=100060138989L;
	
	public static final Integer RANK=102;

	public Auth() {
		setMeta(metaId);
		setRank(RANK);
		setHash(2);
	}

	@Column(name="CODE")
	private String username;

	
	@Column(name="HASH")
	private Integer hash;

	@Column(name="DATA")
	private String pass;

	
	/**
	 * 加密盐
	 * */ 
	@Column(name="SALT")
	private String salt;

	
	/**
	 * 当日登录失败次数
	 * */ 
	@Column(name="FAIL")
	private Integer fail;
	
	

	public String getUsername(){
		return this.username;
	}

	public void setUsername(String username){
		this.username=username;
	}

	public Integer getHash(){
		return this.hash;
	}

	public void setHash(Integer hash){
		this.hash=hash;
	}

	public String getPass(){
		return this.pass;
	}

	public void setPass(String pass){
		this.pass=pass;
	}

	public String getSalt(){
		return this.salt;
	}

	public void setSalt(String salt){
		this.salt=salt;
	}

	public Integer getFail(){
		return this.fail;
	}

	public void setFail(Integer fail){
		this.fail=fail;
	}

}